﻿// * Write a class Matrix, to holds a matrix of integers. Overload the operators for adding, 
// subtracting and multiplying of matrices, indexer for accessing the matrix content and ToString().

using System;

class Program
{
    static void Main()
    {
        Matrix matrix1 = new Matrix(2, 2);
        matrix1[0, 0] = 1;
        matrix1[1, 1] = -12;

        Matrix matrix2 = new Matrix(2, 2);
        matrix2[0, 1] = 2;
        matrix2[1, 1] = 24;

        Console.WriteLine("Get value from Matrix1[1, 1] = {0}", matrix1[1, 1]);
        Console.WriteLine();

        Matrix sum = matrix1 + matrix2;
        Console.WriteLine("Matrix1 + Matrix2");
        Console.WriteLine(sum.ToString());
        Console.WriteLine();

        Console.WriteLine("Matrix1 - Matrix2");
        Matrix subtraction = matrix1 - matrix2;
        Console.WriteLine(subtraction.ToString());
        Console.WriteLine();

        Console.WriteLine("Matrix1 * Matrix2");
        Matrix multiplication = matrix1 * matrix2;
        Console.WriteLine(multiplication.ToString());
        Console.WriteLine();
    }
}